package com.lelouch.wetlanddevice.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.lelouch.wetlandcommon.common.ServerResponse;
import com.lelouch.wetlanddevice.service.CollectionDataServive;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author lcy
 * @create 2018-09-19 16:55
 */
@Controller
@RequestMapping("/collectiondata")
@Slf4j
public class CollectionDataController {

    @Autowired
    private CollectionDataServive collectionDataServive;




    @RequestMapping("/getCountBySiteIds")
    @ResponseBody
    public ServerResponse<Integer> getCountBySiteIds(@RequestParam("siteIds") List<String> siteIds){
        //List<String> siteIdList = JSON.parseArray(siteIds,String.class);
        return collectionDataServive.getCountBySiteIds(siteIds);
    }
}
